package com.skyolder.taskman.word;

import java.io.BufferedReader;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.Reader;
import java.io.StringReader;
import java.io.UnsupportedEncodingException;

public class WordReader {
	private BufferedReader bufferedReader=null;
	public WordReader(File file) throws FileNotFoundException {
		bufferedReader=new BufferedReader(new FileReader(file));
	}
	public WordReader(InputStream inputstream) throws UnsupportedEncodingException{
		bufferedReader=new BufferedReader(new InputStreamReader(inputstream,"UTF8"));
	}
	public WordReader(Reader reader) throws FileNotFoundException {
		bufferedReader=new BufferedReader(reader);
	}
	public WordReader(String src){
		bufferedReader=new BufferedReader( new StringReader(src));
	}
	public String nextLine() throws IOException{
		return bufferedReader.readLine();
	}
}
